import { Box } from '@chakra-ui/react';
import { appStarted } from 'store/middleware/listenerMiddleware/listeners/appStarted';
import { useAppDispatch } from 'store/storeHooks';
import { memo, useEffect } from 'react';
import ServiceButton from 'features/service/components/ServiceButton';
import Toaster from './Toaster';
import Meidu from 'pages/Meidu';
function App() {
  const dispatch = useAppDispatch();

  useEffect(() => {
    console.log('--- app started ---');
    dispatch(appStarted());
  }, [dispatch]);

  return (
    <Box w="100vw" minH="100vh" position="relative" overflow="hidden">
      <Meidu />
      <Toaster />
      <ServiceButton />
    </Box>
  );
}

export default memo(App);
